package com.design.service.impl;

import com.design.domain.vo.SysUser;
import com.design.mapper.UserMapper;
import com.design.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService {

	@Autowired
	private UserMapper userMapper;

	// 根据用户名查询用户信息
	@Override
	public List<SysUser> getUserInfoByUserNameOrPhone(String userName) {
		return userMapper.selectUserInfoByUserNameOrPhone(userName);
	}

	@Override
	public int getCountByUserPhone(String userPhone) {
		return userMapper.selectCountByUserPhone(userPhone);
	}

	@Override
	public int insertUser(SysUser insertUser) {
		return userMapper.insertUser(insertUser);
	}
}
